package com.cy.personer.web;

import com.cy.personer.bean.Log;
import com.cy.personer.biz.LogBiz;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

@Controller
@RequestMapping("/log")
public class LogHandler {
    @Resource
    private LogBiz logBizImpl;

    @RequestMapping("/findLogs.action")
    public ModelAndView findLogs(Log log, int pageNum, int pageSize) {
        ModelAndView mav = new ModelAndView();
        PageInfo<Log> logs = logBizImpl.getLogs(log, pageNum, pageSize);
        mav.addObject("logs",logs);
        mav.setViewName("admin/log_list");
        return mav;
    }


}
